<?php
namespace app\common\validate;

use think\Validate;

class CouponLogs extends Validate
{
    protected $rule = [
        'coupon_id' => 'require|integer',
        'mid' => 'require|integer',
        'is_use' => 'require',
        'use_time' => 'require',
    ];

    protected $message = [
        'coupon_id' => '请选择优惠卷',
        'mid' => '请登陆后操作'
    ];

    protected $scene = [
        'add'    => ['coupon_id','mid'],
        'use'    => ['is_use','use_time'],
    ];
}